import axios from 'axios'
import NProgress from 'nprogress'
const service = axios.create({
  baseURL: 'http://127.0.0.1:3000'
  // baseURL: 'http://10.41.3.28:3000'
  // baseURL: process.env.VUE_APP_BASE_API
})

service.interceptors.request.use(config => {
  NProgress.start()
  return config
}, err => {
  Promise.reject(err)
})

service.interceptors.response.use((response) => {
  NProgress.done()
  return response
}, err => {
  Promise.reject(err)
})

export default service